Database::setIgnoreErrors() doesn't seem to exist anymore. Switched to
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 5 Aug 2004 07:48:20 +0000 (07:48 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 5 Aug 2004 07:48:20 +0000 (07:48 +0000)
Database::ignoreErrors()

includes/Article.php
includes/DatabaseFunctions.php
includes/SpecialImport.php
includes/SpecialMakesysop.php
maintenance/archives/moveCustomMessages.inc

index f14d904..5ada187 100644 (file)
@@ -1848,14 +1848,14 @@ class Article {
                }
 
                # Not important enough to warrant an error page in case of failure
-               $oldignore = $dbw->setIgnoreErrors( true ); 
+               $oldignore = $dbw->ignoreErrors( true ); 
 
                $dbw->query( "INSERT INTO $hitcounterTable (hc_id) VALUES ({$id})" );
 
                $checkfreq = intval( $wgHitcounterUpdateFreq/25 + 1 );
                if( (rand() % $checkfreq != 0) or ($dbw->lastErrno() != 0) ){
                        # Most of the time (or on SQL errors), skip row count check
-                       $dbw->setIgnoreErrors( $oldignore );
+                       $dbw->ignoreErrors( $oldignore );
                        return;
                }
 
@@ -1879,7 +1879,7 @@ class Article {
                        ignore_user_abort( $old_user_abort );
                        wfProfileOut( 'Article::incViewCount-collect' );
                }
-               $dbw->setIgnoreErrors( $oldignore );
+               $dbw->ignoreErrors( $oldignore );
        }
 
        # The onArticle*() functions are supposed to be a kind of hooks
index 43594a3..e0a766d 100644 (file)
@@ -63,7 +63,7 @@ function wfIgnoreSQLErrors( $newstate, $dbi = DB_LAST )
 {
        $db =& wfGetDB( $dbi );
        if ( $db !== false ) {
-               return $db->setIgnoreErrors( $newstate );
+               return $db->ignoreErrors( $newstate );
        } else {
                return NULL;
        }
index 1536834..a11e65c 100644 (file)
@@ -474,7 +474,7 @@ class WikiImporter {
                }
                
                # Insert the row
-               $oldIgnore = $dbw->setIgnoreErrors( true );
+               $oldIgnore = $dbw->ignoreErrors( true );
                $success = $dbw->insert( 'old', 
                        array( 
                                'old_namespace' => intval( $this->title->getNamespace() ),
index 622dd26..0c1aa55 100644 (file)
@@ -149,7 +149,7 @@ class MakesysopForm {
                        $sql = "SELECT user_id, user_rights FROM $usertable WHERE user_name = '{$username}' FOR UPDATE";
                }
                
-               $prev = $dbw->setIgnoreErrors( TRUE );
+               $prev = $dbw->ignoreErrors( TRUE );
                $res = $dbw->query( $sql );
                $dbw->setIgnoreSQLErrors( $prev );
 
index e4eadd5..0bc6119 100644 (file)
@@ -19,7 +19,7 @@ function moveCustomMessages( $phase ) {
 
        $dbw =& wfGetDB( DB_MASTER );
 
-       $dbw->setIgnoreErrors( true );
+       $dbw->ignoreErrors( true );
 
        # Compose DB key array
        $dbkeys = array();